package com.etmvc.core;

import com.et.mvc.binding.BindingContext;
import com.et.mvc.binding.DataBinder;

public class IntegerBinder implements DataBinder{
    public Object bind(BindingContext ctx) throws Exception{
        //...
    	String data = ctx.getRequest().getParameter(ctx.getParameterName());
    	if (data == null || "".equals(data)) {
			return null;
		}
		return new Integer(data);
    }
}